package cn.samir.sudoku.db;

import cn.samir.sudoku.core.Sudokus;
import cn.samir.sudoku.image.SavePair;
import cn.samir.sudoku.util.BeanUtils;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DBHelper extends SQLiteOpenHelper {
	public DBHelper(Context context) {
		super(context, "sudoku.db", null, 1);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL(BeanUtils.getCreateTableSql(Sudokus.class));
		String sql = BeanUtils.getCreateTableSql(SavePair.class);
		db.execSQL(sql);
		Log.i(getDatabaseName(), sql);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		

	}

}
